package com.Test;

import java.util.Arrays;
import java.util.List;

public class Test16 {
    public static void main(String[] args) {

        String data = "0.23 * 900";

        String[] split = data.split("\\*");

        List<String> stringList = Arrays.asList(split);

        String firstData = null;
        String secondData = null;

        // 判空
        if (stringList.size() > 0) {
            if (stringList.size() == 1) {
                firstData = stringList.get(0).trim();
            } else {
                firstData = stringList.get(0).trim();
                secondData = stringList.get(1).trim();
            }
        }

        System.out.println(firstData);
        System.out.println(secondData);

    }
}
